<?php

	// +----------------------------------------------------------------------
	// | 行为日志模型
	// +----------------------------------------------------------------------
	// | Copyright (c) 2015-2024 http://www.yicmf.com, All rights reserved.
	// +----------------------------------------------------------------------
	// | Author: 微尘 <yicmf@qq.com>
	// +----------------------------------------------------------------------

	namespace app\model\ucenter;

	use yicmf\tools\HttpService;

	class IpPool extends Common
	{


		/**
		 * 写入修改
		 * @param $data
		 */
		public static function onBeforeInsert($data)
		{
			$data['status'] = 1;
//			$info = HttpService::get('https://api.asilu.com/ip/?ip=' . $data['ip']);
//			if (isset($info['content']['dz'])) {
//				$re = explode(' ', $info['content']['dz']);
//				$data['country'] = $re[0];
//				$data['region'] = $re[1] ?? '';
//				$data['city'] = $re[2] ?? '';
//			}
		}

	}
